package GenericExercise;

import java.util.List;

public class DAOTest {
    public static void main(String args[])
    {
        DAO<User> dao = new DAO<>();
        dao.save("1001",new User(1001,18,"张学友"));
        dao.save("1002",new User(1002,25,"石文学"));
        dao.save("1003",new User(1003,30,"刘德华"));

//        dao.update("1003",new User(1003,58,"孙悟空"));
//        User user = dao.get("1002");
//        System.out.println(user);
        dao.delete("1001");
        List<User> list = dao.list();
        System.out.println(list);
    }
}
